<template>
	<view>
		<view class="shuju">
			数据绑定过{{num-10}}
			{{str+"你好"}}
			<view class="nihao" v-if="num>20">
				num>20了
			</view>
			<view class="nihao" v-if="num<20">
				num小于20了
			</view>
			
			<view v-for="(item,index) in dataList" :key="index">
				{{item.id}}---{{item.name}}
			</view>
			<view class="view" v-show="num<20">
				num>20了
			</view>
			<view class="hclass" :num='num'>
				属性的绑定
			</view>
			<button type="default" size="mini" @click="myclick(123,$event)"></button>
			<input type="text" value="" @input="myinput"  v-model="str"/>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				datalist:[
					{id:1,name:"张三"},
					{id:2,name:"李四"}
				],
				str:'tom',
				num:10,
				html:'<h1>我是大标签</h1>'
			}
		},
		methods: {
			myclick(e){
				console.log(e)
			},
			myinput(e){
				console.log(e.detail.value)
			}
		}
	}
</script>

<style>
input{
	border: 1px solid #0000FF;
	width: 65%;
}
</style>
